package com.homework.demo1;

public class Student {
    private String name;

    public Student(String name) {
        this.name = name;
    }
    public void printName(Object greeting) throws MustStringArgumentException{
        if(!(greeting instanceof String)){
            throw new MustStringArgumentException("参数类型必须是String类型");
        }
        System.out.println(name+":"+greeting);

    }


}
